using System;

namespace roster.Domain
{
    public class Player : IPlayer
    {
        public Player(string name, Class @class, DateTime lastAttendance)
        {
            Name = name;
            Class = @class;
            LastAttendance = lastAttendance;
        }

        public Player(string name, Class @class) : this(name, @class, DateTime.Now)
        {            
        }

        #region IPlayer Members

        public string Name { get; private set; }
        public Class Class { get; private set; }
        public DateTime LastAttendance { get; set; }

		bool IEquatable<IPlayer>.Equals(IPlayer other)
		{
			return this.Name.Equals(other.Name);
		}
        
        #endregion
    }
}